home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-09-17 | 1.5 KB | 24 lines | [TEXT/MPS ] |
- EvenBetterBusError - a system extension to help catch renegade references to NIL...
-
- Many of you have heard of Mr. BusError, a system extension designed to help catch programs that
- de-reference NIL (thinking it might be a valid handle...). Mr. BusError periodically writes a value
- to location zero which, if dereferenced, will cause a bus error or address error. Actually, though,
- the value which Mr. BusError stuffs into location zero will only cause bus errors on machines
- running in 24-bit mode. It doesn't cause a bus error in 32-bit mode.
-
- So, along comes BetterBusError. It does pretty much the same thing Mr. BusError does, except
- for two things. First, the value it stuffs into location zero is a "bad" address in 32-bit
- mode as well as 24-bit mode. Second, it also checks to see if anyone has written data to location
- zero (another common programming mistake). So far, so good...
-
- Well, unfortunately, the memory manager in the 32-bit clean ROMs has a bug which causes it to
- write to location zero every time SetPtrSize is called while running in 24-bit mode. This causes
- BetterBusError to break into the debugger shouting “Write to NIL!”. Actually, it's only the
- “high” bit of the long at location zero which is changed (the memory manager is “locking” the
- “handle” (which isn’t there...).
-
- EvenBetterBusError (EBBE) to the rescue! EBBE does everything the other two extensions do,
- and also knows to ignore the high bit at zero since the memory manager will change it...
-
- Enjoy.
- Greg Marriott